package cn.huaguo.types.context;

/**
 * @Description 基础上下文
 * @Author wangQian
 * @Date 2024/5/13
 */
public class BaseContext {

    public static ThreadLocal<String> threadLocal = new ThreadLocal<>();

    public static void setCurrentId(String userId) {
        threadLocal.set(userId);
    }

    public static String getCurrentId() {
        return threadLocal.get();
    }

    public static void removeCurrentId() {
        threadLocal.remove();
    }

}
